home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextLibrary / Frameworks / NIAccess.framework / Versions / A / Headers / NIBinder.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-05  |  1.9 KB  |  87 lines

  1. /*    NIBinder.h
  2.     Abstraction of the NetInfo binder (nibindd)
  3.     Copyright (c) 1994, NeXT Computer, Inc.
  4.     All rights reserved.
  5.  */
  6.  
  7. #ifndef STRICT_OPENSTEP
  8.  
  9. #import <NIAccess/NINetInfo.h>
  10. #import <Foundation/NSHost.h>
  11. #import <Foundation/NSString.h>
  12. #import <Foundation/NSArray.h>
  13. #import <Foundation/NSDate.h>
  14.  
  15. #import <objc/objc.h>
  16.  
  17. @class NIServer;
  18.  
  19. @interface NIBinder : NSObject
  20. {
  21.     @private
  22.     void *binder;
  23.     id reserved;
  24. }
  25.  
  26. /*
  27.  * Get a binder object.  Binders are cached for efficiency.  Only one 
  28.  * shared instance of a binder will exist.
  29.  * Addresses must be "Dotted Decimal" strings, e.g.
  30.  * 
  31.  * NIBinder nibind = [NIBinder binderWithAddress:@"192.42.172.1"];
  32.  *
  33.  */
  34. + (NIBinder *)localBinder;
  35. + (NIBinder *)binderWithHost:(NSHost *)host;
  36. + (NIBinder *)binderWithAddress:(NSString *)address;
  37.  
  38. /*
  39.  * Binder cache management
  40.  * If enabled, only one object representing each host will be created, and
  41.  * a shared instance will be returned by all methods that return a host.
  42.  */
  43. + (void)setBinderCacheEnabled:(BOOL)flag;
  44. + (BOOL)isBinderCacheEnabled;
  45. + (void)flushBinderCache;
  46.  
  47. /*
  48.  * Initilaize a binder (bypasses cacheing)
  49.  */
  50. - (NIBinder *)initWithHost:(NSHost *)host;
  51.  
  52. /*
  53.  * Control Timeouts.  Default timeout is 25 seconds.
  54.  */
  55. - (void)setTimeout:(NSTimeInterval)time;
  56. - (NSTimeInterval)timeout;
  57.  
  58. /*
  59.  * Autheticate as root to the binder
  60.  */
  61. - (void)authenticateWithPassword:(NSString *)password;
  62.  
  63. /*
  64.  * Get port numbers for a tag
  65.  */
  66. - (void)getPortsForTag:(NSString *)tag
  67.     udp:(unsigned short *)udp 
  68.     tcp:(unsigned short *)tcp;
  69. - (unsigned short)tcpPortForTag:(NSString *)tag;
  70. - (unsigned short)udpPortForTag:(NSString *)tag;
  71.  
  72. /*
  73.  * Get an array of tags served
  74.  */
  75. - (NSArray *)tags;
  76.  
  77. /*
  78.  * Server management
  79.  */
  80. - (NIStatus)createMasterWithTag:(NSString *)tag;
  81. - (NIStatus)createCloneWithTag:(NSString *)tag master:(NIServer *)master;
  82. - (NIStatus)destroyServerWithTag:(NSString *)tag;
  83.  
  84. @end
  85.  
  86. #endif STRICT_OPENSTEP
  87.